/*
 * Copyright 2010 Mark Eschbach.
 *
 * $HeadURL$
 * $Id$
 */
package com.meschbach.psi.example.salutator;

import java.util.Hashtable;
import java.util.Map;

/**
 *
 * @author "Mark Eschbach" &lt;meschbach@gmail.com&gt;
 */
public class MemorySalutator implements Salutator {

    Map<String, String> greetings;

    public MemorySalutator() {
        greetings = new Hashtable<String, String>();
    }

    public String getGreetingFor(String aName) {
        return greetings.get(aName);
    }

    public boolean hasGreetingFor(String aName) {
        return greetings.containsKey(aName);
    }

    public void setGreetingFor(String aName, String aGreeting) {
        greetings.put(aName, aGreeting);
    }
}
